package com.atguigu.protoType.deepClone;

import java.io.Serializable;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 深度拷贝类的子类
 * @create: 2022-02-10 11:02
 **/
public class DeepCloneableTarget implements Cloneable, Serializable {
    private static final long serialVersionUID = -3734618591331211381L;
    private String cloneName;
    private String cloneClass;

    public DeepCloneableTarget(String cloneName, String cloneClass) {
        this.cloneName = cloneName;
        this.cloneClass = cloneClass;
    }

    /**
     * 因为该类都是String（基本类型）,因此这里我们使用默认的clone即可
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
